<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="m" uri="/cutm_tags"%>
<html>
<head>
<title>串联单的人员分数统计</title>
<link rel="stylesheet" href="<s:url value="/common/css/datepicker.css"/>" type="text/css" />
<script type="text/javascript" src="<s:url value="/common/script/ui.datepicker.js"/>"></script>
<script type="text/javascript" src="<s:url value="/common/script/ui.datepicker-fr.js"/>"></script>
<script type="text/javascript">
$(document).ready(function() {
	$("#editForm").vaildAjax(function(data){
		alert('保存成功！');
		BaseJs.setReadonly();
		$('#btn').hide();
	});
});
//提交
function commit(){
	if(BaseJs.confirm('确定要提交吗？')){
		var contentInfo = '';
		$('.content').each(function(){
			var voId = $(this).find('.voId').val();
			var score = $(this).find('.pScore option:selected').val();
			contentInfo += voId+','+score+';';
		});
		$('#contentInfo').val(contentInfo);
		//alert('contentInfo:'+contentInfo);
		$('#editForm').submit();
	}
}
</script>
</head>
<body>
<h2 class="title"><span>串联单的人员分数统计</span></h2>
<s:form id="serchForm" action="programming/GradeStaff!searchGrade" onsubmit="return true">
	<h3>请输入查询条件</h3>
	<s:hidden name="type" />
	<table id="sTable" class="form">
		<tbody>
			<tr>
				<th width="20%">编排日期</th>
				<td width="30%"><m:date name="beginDate" />-<m:date name="endDate" /></td>
				<th width="20%">编排栏目</th>
				<td width="30%"><m:select enumType="program.type" name="programming.column" /></td>
			</tr>
			<m:permiss permiss="ZIMU_GRADE">
				<tr>
					<th>查询人员</th>
					<td colspan="3"><m:dropUser name="userIds" /></td>
				</tr>
			</m:permiss>
		</tbody>
	</table>
	<div class="btnGroup"><s:submit id="search" value="查询" /></div>
</s:form>

<s:if test="staffScores!=null">
	<table class="list">
		<thead>
			<tr>
				<th width="20%">编排日期</th>
				<th width="10%">编排栏目</th>
				<th width="10%">人员角色</th>
				<th width="20%">姓名</th>
				<th width="10%">分数</th>
				<th width="10%">评分人</th>
				<th width="20%">评分时间</th>
			</tr>
		</thead>
		<tbody>
			<s:iterator value="staffScores">
				<tr id="${id}" class="content">
					<td><s:date name="programming.date" format="yyyy-MM-dd" /></td>
					<td><m:property value="programming.column" /></td>
					<td><s:property value="type" /></td>
					<td><s:property value="user.name" /></td>
					<td><m:property value="score" /></td>
					<td><s:property value="gradeUser.name" /></td>
					<td><s:date name="date" format="yyyy-MM-dd" /></td>
				</tr>
			</s:iterator>
		</tbody>
		<tr>
			<td colspan="4">合计</td>
			<td><s:property value="sum" /></td>
			<td></td>
			<td></td>
		</tr>
	</table>
</s:if>
</body>
</html>